<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <form name="f1">
      <p>
        城市
        <select name="city">
          <option value="nj" selected>南京</option>
          <option value="sh">上海</option>
          <option value="wx">无锡</option>
          <option value="sz">苏州</option>
        </select>
      </p>
      <button name="saveBtn" type="button">提交</button>
    </form>
    <script>
      setTimeout(() => {
        document.f1.city.value = "sh";
      }, 3000);
      document.f1.saveBtn.onclick = function () {
        console.log(document.f1.city.value);
      };
    </script>
  </body>
</html>
